import Route from '@ember/routing/route';

export default Route.extend({

    model(){
        this.store.push({
            data:[{
                id: 1,
                type: 'album',
                attributes: {
                  title: 'Fewer Moving Parts',
                  artist: 'David Bazan',
                  songCount: 10
                },
                relationships: {}
              }, {
                id: 2,
                type: 'album',
                attributes: {
                  title: 'Calgary b/w I Can\'t Make You Love Me/Nick Of Time',
                  artist: 'Bon Iver',
                  songCount: 2
                },
                relationships: {}
              }]
        }),
        this.store.pushPayload({
          albums:[
            {
              id: 1,
              title: 'Fever Moving Parts',
              artist: 'David Bazan',
              //song_count 在序列化中进行了转换，将song_count 转化成songCount 见/app/serializers/albums.js
              song_count: 10
            },
            {
              id: 2,
              title: 'Calgary b/w I Can\'t Make You Love Me/Nick Of Time',
              artist: 'Bon Iver',
              song_count: 2
            }
          ]
        })
    }
});
